package com.mf.entity.req;

import com.mf.groups.GroupsAddInterface;
import com.mf.groups.GroupsUpdateInterface;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 粉碎工单提交
 */
@Data
public class ReqSmash implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @NotNull(message = "id不能为空", groups = {GroupsUpdateInterface.class})
    @Null(message = "新增id必须为空", groups = {GroupsAddInterface.class})
    private Integer id;
    @Schema(description = "客户id")
    @NotNull(message = "客户id不能为空", groups = {GroupsAddInterface.class})
    private Integer customerId;
    @Schema(description = "客户名称")
    @NotBlank(message = "客户名称不能为空", groups = {GroupsAddInterface.class})
    private String customerName;

    @Schema(description = "虚拟工单标识")
    @NotNull(message = "虚拟工单标识不能为空", groups = {GroupsAddInterface.class, GroupsUpdateInterface.class})
    private String workFlag;

    @Schema(description = "投入产出比")
    @NotNull(message = "投入产出比不能为空", groups = {GroupsAddInterface.class, GroupsUpdateInterface.class})
    private Double outRatio;

}
